<?php

namespace app\common\core;

class HtmlPassage
{
    protected static $instance;
    protected $config=[];
    public static function instance()
    {
        if (is_null(self::$instance)) {
            self::$instance = new static();
        }
        return self::$instance;
    }
    public function setAddHtml($key,$value)
    {
        if(is_file($value)){
            $value = file_get_contents($value);
        }
        $this->config[$key][] = $value;
    }
    public function getAddHtml($key='')
    {
        if(empty($key)){
            return $this->config;
        }
        return $this->config[$key];
    }
}